package xdu.lz.beanlife;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @date 2020/5/24 21:49
 */
@Configuration
@Import({
		//在获取BeanFactory之前执行
		MyBeanFactoryPostProcessor.class
		//监听器
		,MyListener.class
		,MyParam.class}
		)
public class MyConfig {
	@Bean
			(initMethod = "my_init",destroyMethod = "my_destroy")
	public User getUser(){
		return new User();
	}
	@Bean
	public MyBeanPostProcessor getMyBeanPostProcessor(){
		return new MyBeanPostProcessor();
	}
}
